From: Sebastian Keller Date: Thu, 4 Nov 2021 11:48:26 +0000 (+0100) Subject: dateMenu: Ignore the allDay property of an event X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~536^2^2~60 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d8efce0ffd75cce4322d846ad5216eab3137a789;p=gnome-shell.git dateMenu: Ignore the allDay property of an event Given the correct end date this code would be able to determine this correctly itself and doesn't need to rely on that property. And events without correct end dates are currently not shown anyway. This prepares for removing the allDay property entirely. This also fixes events going from 13:00 the current day to 01:00 not showing "...". It also fixes multi-day events wrongly detected as all-day events by the calendar-server showing up as "All day", despite only covering 1 hour of the day. Part-of: --- diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js index f235ba38a..6edd790a0 100644 --- a/js/ui/dateMenu.js +++ b/js/ui/dateMenu.js @@ -170,8 +170,8 @@ class EventsSection extends St.Button { } _formatEventTime(event) { - const allDay = event.allDay || - (event.date <= this._startDate && event.end >= this._endDate); + const allDay = + event.date <= this._startDate && event.end >= this._endDate; let title; if (allDay) { @@ -185,13 +185,13 @@ class EventsSection extends St.Button { } const rtl = Clutter.get_default_text_direction() === Clutter.TextDirection.RTL; - if (event.date < this._startDate && !event.allDay) { + if (event.date < this._startDate) { if (rtl) title = '%s%s'.format(title, ELLIPSIS_CHAR); else title = '%s%s'.format(ELLIPSIS_CHAR, title); } - if (event.end > this._endDate && !event.allDay) { + if (event.end > this._endDate) { if (rtl) title = '%s%s'.format(ELLIPSIS_CHAR, title); else